package com.translate.web.service;
import com.basic.service.contract.IBaseService;
import com.translate.entity.CommissionManagement;
import com.translate.vo.contract.ICommissionManagementVO;
import com.translate.web.param.contract.IWithdrawalAddParam;

public interface ICommissionManagementService extends IBaseService<CommissionManagement> {

	/**
	 * 根据userid 获取佣金记录
	 * @param <VO>
	 * @param userId
	 * @param type
	 * @return
	 */
	<VO extends ICommissionManagementVO> VO getDataByUserId(long userId, Class<VO> type); 

	/**
	 * 兑换学术币
	 * @param addParam
	 * @return
	 */
	int exchangeAcademicCoins(IWithdrawalAddParam addParam);
	
	/**
	 * 添加推荐人
	 * @return
	 */
	int insertRecommendUser(long userId, String userName);
	
	
	
	
	public CommissionManagement getCommissonManagent(long userId);

	/**
	 * 更新提现金额
	 * @param userId
	 * @return
	 */
	CommissionManagement getCommissonManagentForUpdate(long userId);
	
}
